﻿package com.fluidsoftwarellc.xon.events
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Scott Tompkins
	 * Flash XON Parser (http://code.google.com/p/as3-fxon/)
	 * Copyright (C) 2011  Scott C. Tompkins
	 * 
	 * This program is free software: you can redistribute it and/or modify
	 * it under the terms of the GNU General Public License as published by
	 * the Free Software Foundation, either version 3 of the License, or
	 * (at your option) any later version.
	 * 
	 * This program is distributed in the hope that it will be useful,
	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	 * GNU General Public License for more details.
	 * 
	 * You should have received a copy of the GNU General Public License
	 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
	 */
	public class XONLoaderEvent extends Event
	{
		private static const _LOADER_COMPLETE:String = "onLoaderComplete";
		private var _object:Object;
		
		public static function get LOADER_COMPLETE():String { return _LOADER_COMPLETE; }
		public function get object():Object { return _object; }
		
		
		public function XONLoaderEvent(type:String, object:Object, bubbles:Boolean = false, cancelable:Boolean = false) 
		{
			super(type, bubbles, cancelable);
			_object = object;
		}
		
		public override function clone():Event
		{
			return new XONLoaderEvent(type, _object, bubbles, cancelable);
		}
		
		public override function toString():String
		{
			return formatToString("XONLoaderEvent", "object", "type", "bubbles", "cancelable");
		}
	}

}